package com.easemob.server.example.comm.body;

import com.easemob.server.example.comm.wrapper.BodyWrapper;
import com.fasterxml.jackson.databind.node.ArrayNode;
import com.fasterxml.jackson.databind.node.ContainerNode;
import com.fasterxml.jackson.databind.node.JsonNodeFactory;
import com.fasterxml.jackson.databind.node.ObjectNode;

public class NewAdminBody implements BodyWrapper {

	 private String users;

	    public NewAdminBody(String users) {
	        this.users = users;
	    }

	    public String getUsers() {
	        return users;
	    }

	    public void setUsers(String users) {
	        this.users = users;
	    }
	
	@Override
	public ContainerNode<?> getBody() {
		 	ObjectNode body = JsonNodeFactory.instance.objectNode();
	        //ArrayNode names = JsonNodeFactory.instance.arrayNode();
	        body.put("newadmin", users);

	        return body;
	}

	@Override
	public Boolean validate() {
		return null != users;
	}

}
